<?php 

use frontend\assets\AppAsset;


use yii\helpers\Html;

use yii\widgets\ActiveForm;
use frontend\models\Company;
AppAsset::register($this);

 ?>
 <?php $this->beginPage() ?>

<head>
<!-- Bootstrap -->
<link href="company/css/bootstrap.min.css" rel="stylesheet">
<!-- Ionicons -->
<link href="fonts/ionicons/company/css/ionicons.min.css" rel="stylesheet">
<!-- Owl Carousel -->
<link href="company/css/owl.carousel.css" rel="stylesheet">
<link href="company/css/owl.theme.default.css" rel="stylesheet">
<!-- Animate.css -->
<link href="company/css/animate.min.css" rel="stylesheet">
<!--Magnific Popup -->
<link href="company/css/magnific-popup.css" rel="stylesheet">
<!--Tagsinput CSS -->
<link href="company/css/tagsinput.css" rel="stylesheet">		
<!-- Style.css -->
<link href="company/css/style.css" rel="stylesheet">

</head>

    <?php $this->head() ?>
    <?php $this->beginBody() ?>
 <header class="header">
	<div class="container clearfix">
		<div class="header-inner flex space-between items-center">
			<div class="left">
				<div class="logo"><a href="index.html"><img src="company/images/logo.png" alt="JobPress" class="img-responsive"></a></div>	
			</div> <!-- end .left -->				
			<div class="right flex space-between no-column items-center">
				<div class="navigation">
					<nav class="main-nav">
						<ul class="list-unstyled">
							<li><a href="?r=company/index">首页</a></li>
							<li><a href="?r=company/work_add">职位管理</a></li>
							<li><a href="?r=company/company_reg">公司注册</a></li>
							<li><a href="?r=company/index">收藏列表</a></li>
							<li><a href="?r=company/about">关于我们</a></li>
							<li><a href="?r=company/contact">联系我们</a></li>
						</ul>
					</nav> <!-- end .main-nav -->
					<a href="" class="responsive-menu-open"><i class="ion-navicon"></i></a>
				</div> <!-- end .navigation -->
				<div class="button-group-merged flex no-column">
				<?php $cookies = Yii::$app->request->cookies; $user = unserialize($cookies->getValue('company'));if($user){ ?>
					<a href="#" class="button">欢迎您<?php echo $user['CTelName']?>	登录</a>
					<a href="?r=company/loginout" class="button" >退出登录</a>
					<?php }else{ ?>
					<a href="#register" class="button" data-toggle="modal" data-target=".bs-modal-sm">请您登录-></a>
					<a href="#register" class="button" data-toggle="modal" data-target=".bs-modal-sm">登录/注册</a>
				 <?php } ?>
				</div> <!-- end .button-group-merged -->
			</div> <!-- end .right -->
		</div> <!-- end .header-inner -->
	</div> <!-- end .container -->
</header> <!-- end .header -->
<div class="modal fade bs-modal-sm" aria-hidden="true" aria-labelledby="myTabContent"  id="login-signup-popup" role="dialog" tabindex="-1">
	<div class="modal-dialog modal-sm login-signup-modal">
		<div class="modal-content">
			<div class="popup-tabs">
				<ul class="nav nav-tabs" id="myTab">
					<li class=""><a data-toggle="tab" href="#login">登录</a></li>
					<li class="active"><a data-toggle="tab" href="#register">注册</a></li>
				</ul>
			</div> <!-- end .popup-tabs -->
			<div class="modal-body">
				<div class="tab-content" id="myTabContent">
					<div class="tab-pane fade" id="login">
						<?php $model = new Company; $form = ActiveForm::begin(['action' => '?r=company/login','method'=>'post']); ?>

							<div class="form-group">
							
								<?= $form->field($model, 'CEmail')->textInput(['autofocus' => true]) ?>
							</div>

							<div class="form-group">
						
								<?= $form->field($model, 'CPassword')->passwordInput() ?>
							</div>

						<!-- end .checkbox -->
                           <!--  <a href="#0">忘记密码?</a> -->
							
							 <?= Html::submitButton('登录', ['class' => 'btn btn-primary','style'=>'width:150']) ?>
							<p class="text-center divider-text small"><span>or login using</span></p>
							
							<div class="social-buttons">
								<ul class="list-unstyled flex space-between">
									<li class="twitter-btn"><a href="#0"><i class="ion-social-twitter"></i></a></li>
									<li class="fb-btn"><a href="#0"><i class="ion-social-facebook"></i></a></li>
									<li class="g-plus-btn"><a href="#0"><i class="ion-social-googleplus"></i></a></li>
								</ul>
							</div> <!-- end .social-buttons -->
						<?php ActiveForm::end(); ?> <!-- end .login-form -->
					</div> <!-- end login-tab-content -->

					<div class="tab-pane fade active in" id="register">
						<?php $model = new Company; $form = ActiveForm::begin(['action' => '?r=company/regist','method'=>'post']); ?>
							<div class="form-group">
							
								<?= $form->field($model, 'CEmail')->textInput() ?>
							</div>

							<div class="form-group">
								
								<?= $form->field($model, 'CPassword')->passwordInput() ?>
							</div>

							<div class="form-group">
								
								<?= $form->field($model, 'qr')->passwordInput() ?>
							</div>


							<div class="form-group">
						
								<?= $form->field($model, 'CTelName')->passwordInput() ?>
							</div>
							<div class="form-group">
	
								<?= $form->field($model, 'CTel')->passwordInput() ?>
							</div>

							 <?= Html::submitButton('注册', ['class' => 'btn btn-primary','style'=>'width:150']) ?>
							
							<p class="text-center divider-text small"><span>or login using</span></p>
							
							<div class="social-buttons">
								<ul class="list-unstyled flex space-between">
									<li class="twitter-btn"><a href="#0"><i class="ion-social-twitter"></i></a></li>
									<li class="fb-btn"><a href="#0"><i class="ion-social-facebook"></i></a></li>
									<li class="g-plus-btn"><a href="#0"><i class="ion-social-googleplus"></i></a></li>
								</ul>
							</div> <!-- end .social-buttons -->

						<?php ActiveForm::end(); ?>  <!-- end .signup-form -->
					</div> <!-- end signup-tab-content -->
				</div> <!-- end .mytabcontent -->
			</div> <!-- end .modal-body -->
		</div> <!-- end .modal-content -->
	</div> <!-- end .modal-dialog -->
</div> <!-- end .modal -->


<?php echo $content; ?>

<div class="section footer transparent" style="background-image: url('company/images/background03.jpg');">
	<div class="container">
		<div class="top flex space-between items-center">
			<img src="company/images/footer-logo.png" alt="footer-logo" class="img-responsive">
			<ul class="list-unstyled footer-menu flex">
				<li><a href="#0">Home</a></li>
				<li><a href="#0">About</a></li>
				<li><a href="#0">Browse Jobs</a></li>
				<li><a href="#0">Browse candidates</a></li>
				<li><a href="#0">Contact</a></li>
			</ul> <!-- end .footer-menu -->				
		</div> <!-- end .top -->
		
</div> <!-- end .footer -->

<script src="company/js/jquery-3.1.1.min.js"></script>
<!-- Bootstrap -->
<script src="company/js/bootstrap.min.js"></script>
<!-- google maps -->
<!---<script src="http://ditu.google.cn/maps/api/js?key=AIzaSyAy-PboZ3O_A25CcJ9eoiSrKokTnWyAmt8"></script>--->
<!-- Owl Carousel -->
<script src="company/js/owl.carousel.min.js"></script>
<!-- Wow.js -->
<script src="company/js/wow.min.js"></script>
<!-- Typehead.js -->
<script src="company/js/typehead.js"></script>
<!-- Tagsinput.js -->
<script src="company/js/tagsinput.js"></script>
<!-- Bootstrap Select -->
<script src="company/js/bootstrap-select.js"></script>		
<!-- Waypoints -->
<script src="company/js/jquery.waypoints.min.js"></script>
<!-- CountTo -->
<script src="company/js/jquery.countTo.js"></script>
<!-- Isotope -->
<script src="company/js/isotope.pkgd.min.js"></script>
<script src="company/js/imagesloaded.pkgd.min.js"></script>
<!-- Magnific-Popup -->
<script src="company/js/jquery.magnific-popup.js"></script>
<!-- Scripts.js -->
<script src="company/js/scripts.js"></script>


  <?php $this->endBody() ?>
  <?php $this->endPage() ?>